/*
 * Copyright (C) 2011 Wglxy.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.tnt.notice;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.tnt.dashboard.DashboardActivity;
import com.tnt.dashboard.R;

/**
 * 공지사항 조회.
 *
 */

public class ActivityNotice extends DashboardActivity 
{
	private NoticeInfo  mItem = null;
	private TextView    mTitle;
	private TextView    mDesc;
	
protected void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView (R.layout.activity_notice);
    setTitleFromActivityLabel (R.id.title_text);
    
	mTitle   = (TextView)findViewById(R.id.tvTitle);
	mDesc    = (TextView)findViewById(R.id.tvDesc );
	
	loadNotice();
}

@Override
public void onClick(View arg0) {
	
}

private void loadNotice(){
	
	mItem = new NoticeInfo();
	
	mItem.setLink(getIntent().getExtras().getString("URL"));
	mItem.setTitle(getIntent().getExtras().getString("TITLE"));
	mItem.setDescription(getIntent().getExtras().getString("DESCRIPTION"));
	mItem.setPubdate(getIntent().getExtras().getString("DATE"));
	
    // Set News.
	mTitle.setText(mItem.getTitle());
	mDesc.setText(mItem.getDescription() + "\r\n\r\n" + mItem.getPubdate());
}
    
} // end class
